@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content" style="border:none !important; ">
        <div class="form-horizontal" id="documentsForm">

            <input type="hidden" id="id" value="">
            <div class="row">
                <div class="col-sm-10">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">文档上传</label>
                        <div class="col-sm-9">
                            <div class="upload-btn" id="fileBtnId">
                                <i class="fa fa-upload"></i>&nbsp;上传文件
                            </div>
                            <br>
                            <p style="color:blue;">注：文档上传完成即添加成功，如未进行提交，可到文档列表重新进行信息完善</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">文档标题</label>
                        <div class="col-sm-9">
                            <input class="form-control" id="documentName" name="documentName" type="text"
                                   placeholder="文档标题上传成功后返回，可编辑"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">标签</label>
                        <div class="col-sm-9">
                            <input class="form-control" id="tag" name="tag" type="text"
                                   placeholder="标签之间以英文逗号间隔，例如：标签A,标签B..."/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">上传者</label>
                        <div class="col-sm-9">
                            <input class="form-control" id="operator" name="operator" type="text"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">简介</label>
                        <div class="col-sm-9">
                            <div id="editor" class="editorHeight">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">分类</label>
                        <div class="col-sm-9">
                            <select class="form-control" id="categoryId"
                                    onchange="DocumentsInfoDlg.getCategoryChildList(this.options[this.options.selectedIndex].value)">
                                <option value="" selected="selected">请选择</option>
                                @for(category in categoryList){
                                <option value="${category.id}">${category.categoryName}</option>
                                @}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子分类</label>
                        <div class="col-sm-9">
                            <select class="form-control" id="categoryChildId">
                                <option value="" selected="selected">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">收费类型</label>
                        <div class="col-sm-9">
                            <select class="form-control" id="priceType"
                                    onchange="DocumentsInfoDlg.changePricetype(this.options[this.options.selectedIndex].value)">
                                <option value="0" selected="selected">免费文档</option>
                                <option value="1">会员免费</option>
                                <option value="2">会员优惠</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group" id="normalPriceDiv">
                        <label class="col-sm-3 control-label">用户购买价格</label>
                        <div class="col-sm-9">
                            <input class="form-control" id="normalPrice" name="normalPrice" type="text"
                                   placeholder="收费类型为免费文档可不填，其它必填，保留两位小数"/>
                        </div>
                    </div>
                    <div class="form-group" id="memberPriceDiv">
                        <label class="col-sm-3 control-label">会员优惠价格</label>
                        <div class="col-sm-9">
                            <input class="form-control" id="memberPrice" name="memberPrice" type="text"
                                   placeholder="收费类型为会员优惠必填，其它可为空，保留两位小数"/>
                        </div>
                    </div>
                </div>
            </div>


            <div class="row btn-group-m-t">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-9">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="DocumentsInfoDlg.editSubmit()"/>
                </div>
            </div>
            <div class="progress progress-striped" id="progressTipArea" style="margin-top: 20px;">
                <div id="progressBar" style="width: 0%" aria-valuemax="100" aria-valuemin="0"
                     aria-valuenow="0" role="progressbar" class="progress-bar progress-bar-info">
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="${ctxPath}/static/js/plugins/wangEditor/wangEditor.js"></script>
<script src="${ctxPath}/static/modular/system/documents/documents_info.js"></script>
<script src="${ctxPath}/static/js/common/web-upload-file-object.js"></script>
@}
